package main

import (
	"net/http"
	"wechat/app/middlewares"
	"wechat/bootstrap"
	"wechat/config"
	c "wechat/pkg/config"
)

func init() {
	// 初始化配置信息
	config.Initialize()
}

func main() {
	// 初始化路由
	router := bootstrap.SetupRoute()
	//监听端口
	http.ListenAndServe(":"+c.GetString("app.port"), middlewares.RemoveTrailingSlash(router))
}
